﻿using UnityEngine;
using System.Collections;

public class BulletFly : MonoBehaviour {
	float flySpeed = 20f;
	float flyDistance = 10f;
	float flyTime;
	Rigidbody rigidbody;
	// Use this for initialization
	void Start () {
		rigidbody = GetComponent<Rigidbody> ();
		rigidbody.velocity = transform.up * flySpeed;
		//print (rigidbody.velocity);
		flyTime = flyDistance / flySpeed;
		Destroy (gameObject, flyTime);
	}
	
	// Update is called once per frame
	void Update () {
	}
}
